using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace VideoAndMap.Controls
{
    /// <summary>
    /// Search Result.
    /// </summary>
    public partial class SearchResult : UserControl
    {
        /// <summary>
        /// Gets or sets the date.
        /// </summary>
        /// <value>The date.</value>
        public string Date
        {
            get { return dateCreated.InnerText; }
            set { dateCreated.InnerText = value; }
        }

        /// <summary>
        /// Gets or sets the link.
        /// </summary>
        /// <value>The link.</value>
        public string Link
        {
            get { return mainLink.HRef; }
            set { mainLink.HRef = "../Default.aspx?id=" + value;
            inLink.HRef = "../Default.aspx?id=" + value;
        }
        }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>The description.</value>
        public string Description
        {
            get { return mainLink.InnerText; }
            set { mainLink.InnerText = value; }
        }

        /// <summary>
        /// Gets or sets the rating.
        /// </summary>
        /// <value>The rating.</value>
        public double Rating
        {
            set
            {
                Rating1.CurrentRating = (int)(3 * value);
            }
        }

        /// <summary>
        /// Gets or sets the image URL.
        /// </summary>
        /// <value>The image URL.</value>
        public string ImageUrl
        {
            set
            {
                smallImage.ImageUrl = value;
            }
        }
    }
}